// src/stores/iconStore.ts
import { defineStore } from 'pinia';
import { Goods, School, Briefcase, List, Check, User, Menu ,Calendar} from '@element-plus/icons-vue';
import type { Component } from 'vue';

// 定义图标组件映射对象
const iconComponentMap: { [key: string]: Component } = {
    Goods,
    School,
    Briefcase,
    List,
    Check,
    User,
    Menu,
    Calendar
};

export const useIconStore = defineStore('iconStore', {
    state: () => ({}),
    getters: {
        getIconComponent: () => (iconName: string) => {
            return iconComponentMap[iconName] || null;
        }
    },
    actions: {}
});